package project02mutiply;

public class Car extends Vehicle{
    //private  String type;//型号
    final int seat=5;

    public Car(){}
    public Car(String brand, String license, int dayMoney ) {
        super(brand, license, dayMoney);

    }

    public double calculateRent(int day) {
        if (day > 7) {
            return day * getDayMoney() * 0.9;
        } else if (day > 30) {
            return day * getDayMoney() * 0.8;
        } else if (day > 150) {
            return day * getDayMoney() * 0.7;
        }
        return day * getDayMoney();
    }
    public void show(){
        String stateString = (state==false)?"当前可租":"当前不可租";
            setType("轿车");
            System.out.println(getType()+"\t"+ getBrand()+"\t"+ getLicense()+"\t"
                    +seat+"\t"+getDayMoney()+"\t"+stateString);
    }
}
